<?php
ini_set('display_errors', 1);
$dir = dirname(dirname(__FILE__));
include($dir.'/__queue_global.php');


class ml_mq_atNick_followInitRedis extends MqClass{
    const QUEUE_NAME = ML_QUEUENAME_ATNICK_NEWFOLLOW;
    private $oBizFollow;
    
    public function __construct($queue)
    {
        $this->oBizFollow = new ml_biz_atNick_followList();
        
        parent::__construct($queue);
    }    
    
    public function run_job(){
        //接收的数据
        $arr = $this->src_data;
        
        $uid = trim($arr['uid']); 
        $follow_uid = $arr['fuid'];
        $type = $arr['type'];//new,del
        
        
        if (empty($uid) || empty($follow_uid)) {
            return ;
        }
        
     switch ($type) {

            case 'new':
                $re = $this->oBizFollow->init_newFollow_redis($uid, $follow_uid);
                break;
            case 'del':
                $re = $this->oBizFollow->remove_Follow_redis($uid, $follow_uid);
                break;
                
        }

        
    }
    
    
}

$xblog_obj = new ml_mq_atNick_followInitRedis(new McQueue(ml_mq_atNick_followInitRedis::QUEUE_NAME));
$argv[1]   = __FILE__;
$xblog_obj->setArgv($argv[1]);
$xblog_obj->execute();